<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'userMain.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="css/common.css">
<script type="text/javascript">
	if(top!=self){
		top.location=self.location;
	}
</script>
</head>
  
  <body>
    <div id="login_page">
    	<s:form action="jsp_login.action" method="post" theme="simple">
	    	<table id="tb1">
	    		<tr>
	    			<td colspan="2" id="logo"><img src="img/logo.png"/></td>
	    		</tr>
	    		<tr>
	    			<td colspan="2" align="center" id="hello">网络书店欢迎您</td>
	    		</tr>
	    		<tr>
	    			<td colspan="2" align="center">
	    				<table id="tb12">
	    					<tr>
				    			<td class="userstyle">用户账号</td>
				    			<td><s:textfield name="username" maxlength="30px" style="width:150px; float:right; margin-right:25px;"></s:textfield></td>
				    		</tr>
				    		<tr>
				    			<td class="userstyle">用户密码</td>
				    			<td><s:password name="pwd" maxlength="30px" style="width:150px; float:right; margin-right:25px;"></s:password></td>
				    		</tr>
				    		<s:if test="%{errorMessage!=null}">
				    			<tr>
				    				<td colspan="2">
				    					<s:property value="errorMessage" />
				    				</td>
				    			</tr>
				    		</s:if>
				   			<tr>
				   				<td colspan="2">
				   					<s:submit value="登录" ></s:submit>
				   					<s:reset value="重置" ></s:reset>
				   					<a href="jsp/user/register.jsp">注册</a>
				   					<a href="jsp/user/main.jsp">不登录，只浏览</a>
				   				</td>
				   			</tr> 
	    				</table>
	    			</td>
	    		</tr>
	    			    		
	    	</table>    	
    	</s:form>
    </div>
  </body>
</html>
